home *** CD-ROM | disk | FTP | other *** search
- #include "hc.h"
-
- #define DOSBase ADOSBase
- static struct Library *ADOSBase = NULL;
- static BPTR DebugOut = NULL;
-
-
- void Outer (struct DebugInfo *dbi)
- {
- ULONG result;
-
- dbi->OutSig = AllocSignal (-1);
-
- ADOSBase = OpenLibrary ("dos.library", 0L);
- if (ADOSBase)
- {
- DebugOut = Open ("con:420/0/220/200/HC_DebugOut", ACTION_FINDUPDATE);
- if (DebugOut == NULL)
- {
- goto quit;
- }
-
- do
- {
- result = Wait (1L << dbi->OutSig | KILL_PROCESS_FLAG);
- if (result & (1L << dbi->OutSig))
- {
- Write (DebugOut, dbi->Msg, strlen (dbi->Msg));
- Signal (dbi->HCProc, 1L << dbi->HCSig);
- }
- }
- while (!(result & KILL_PROCESS_FLAG));
- }
-
- quit:
- if (DebugOut) Close (DebugOut);
- if (ADOSBase) CloseLibrary (ADOSBase);
- }
-